package com.bsoft.gol.hcs.specialist.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * @author liwenlong
 * @version v0.1
 * @className DiseaseSpeciesRelate
 * @description 病种关联信息
 * @create 2020-07-18 10:34
 **/
@Entity
@Table(name = "fus_disease_relate_list")
public class DiseaseSpeciesRelate {
    private Long recordId;
    private Long diseaseTypeId;
    private String diseaseTypeName;
    private String relateRecordId;
    private String relateName;
    private String relateType;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh_CN", timezone = "GMT+8")
    private Date gmtCreate;
    private String sampleTypeCode;
    private String sampleTypeName;
    private String measureCode;
    private String measureName;
    private String indexResultType;
    private String minAge;
    private String maxAge;
    private String sexCode;
    private String indexUpperLimit;
    private String indexLowerLimit;
    private String indexIds;//选项ids,逗号分割
    private String indexValue;
    private String warn;
    private String standards;
    private String factory;
    private String drugType;
    @Transient
    private String indexType;//指标分类枚举类型
    @Transient
    private String indexClassifyId;//指标分类id

    @Id
    @Column(name = "record_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Long getRecordId() {
        return recordId;
    }

    public void setRecordId(Long recordId) {
        this.recordId = recordId;
    }

    @Basic
    @Column(name = "disease_type_name")
    public String getDiseaseTypeName() {
        return diseaseTypeName;
    }

    public void setDiseaseTypeName(String diseaseTypeName) {
        this.diseaseTypeName = diseaseTypeName;
    }


    @Basic
    @Column(name = "disease_type_id")
    public Long getDiseaseTypeId() {
        return diseaseTypeId;
    }

    public void setDiseaseTypeId(Long diseaseTypeId) {
        this.diseaseTypeId = diseaseTypeId;
    }

    @Basic
    @Column(name = "relate_record_id")
    public String getRelateRecordId() {
        return relateRecordId;
    }

    public void setRelateRecordId(String relateRecordId) {
        this.relateRecordId = relateRecordId;
    }

    @Basic
    @Column(name = "relate_name")
    public String getRelateName() {
        return relateName;
    }

    public void setRelateName(String relateName) {
        this.relateName = relateName;
    }

    @Basic
    @Column(name = "relate_type")
    public String getRelateType() {
        return relateType;
    }

    public void setRelateType(String relateType) {
        this.relateType = relateType;
    }

    @Basic
    @Column(name = "gmt_create")
    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    @Basic
    @Column(name = "sample_type_code")
    public String getSampleTypeCode() {
        return sampleTypeCode;
    }

    public void setSampleTypeCode(String sampleTypeCode) {
        this.sampleTypeCode = sampleTypeCode;
    }

    @Basic
    @Column(name = "sample_type_name")
    public String getSampleTypeName() {
        return sampleTypeName;
    }

    public void setSampleTypeName(String sampleTypeName) {
        this.sampleTypeName = sampleTypeName;
    }

    @Basic
    @Column(name = "measure_code")
    public String getMeasureCode() {
        return measureCode;
    }

    public void setMeasureCode(String measureCode) {
        this.measureCode = measureCode;
    }
    @Basic
    @Column(name = "measure_name")
    public String getMeasureName() {
        return measureName;
    }

    public void setMeasureName(String measureName) {
        this.measureName = measureName;
    }

    @Basic
    @Column(name = "index_result_type")
    public String getIndexResultType() {
        return indexResultType;
    }

    public void setIndexResultType(String indexResultType) {
        this.indexResultType = indexResultType;
    }

    @Basic
    @Column(name = "minAge")
    public String getMinAge() {
        return minAge;
    }

    public void setMinAge(String minAge) {
        this.minAge = minAge;
    }

    @Basic
    @Column(name = "maxAge")
    public String getMaxAge() {
        return maxAge;
    }

    public void setMaxAge(String maxAge) {
        this.maxAge = maxAge;
    }

    @Basic
    @Column(name = "sexCode")
    public String getSexCode() {
        return sexCode;
    }

    public void setSexCode(String sexCode) {
        this.sexCode = sexCode;
    }

    @Basic
    @Column(name = "indexUpperLimit")
    public String getIndexUpperLimit() {
        return indexUpperLimit;
    }

    public void setIndexUpperLimit(String indexUpperLimit) {
        this.indexUpperLimit = indexUpperLimit;
    }

    @Basic
    @Column(name = "indexLowerLimit")
    public String getIndexLowerLimit() {
        return indexLowerLimit;
    }

    public void setIndexLowerLimit(String indexLowerLimit) {
        this.indexLowerLimit = indexLowerLimit;
    }

    @Basic
    @Column(name = "indexIds")
    public String getIndexIds() {
        return indexIds;
    }

    public void setIndexIds(String indexIds) {
        this.indexIds = indexIds;
    }

    @Basic
    @Column(name = "indexValue")
    public String getIndexValue() {
        return indexValue;
    }

    public void setIndexValue(String indexValue) {
        this.indexValue = indexValue;
    }

    @Basic
    @Column(name = "warn")
    public String getWarn() {
        return warn;
    }

    public void setWarn(String warn) {
        this.warn = warn;
    }

    @Basic
    @Column(name = "standards")
    public String getStandards() {
        return standards;
    }

    public void setStandards(String standards) {
        this.standards = standards;
    }

    @Basic
    @Column(name = "factory")
    public String getFactory() {
        return factory;
    }

    public void setFactory(String factory) {
        this.factory = factory;
    }

    @Basic
    @Column(name = "drugType")
    public String getDrugType() {
        return drugType;
    }

    public void setDrugType(String drugType) {
        this.drugType = drugType;
    }

    @Transient
    public String getIndexType() {
        return indexType;
    }

    public void setIndexType(String indexType) {
        this.indexType = indexType;
    }

    @Transient
    public String getIndexClassifyId() {
        return indexClassifyId;
    }

    public void setIndexClassifyId(String indexClassifyId) {
        this.indexClassifyId = indexClassifyId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        DiseaseSpeciesRelate that = (DiseaseSpeciesRelate) o;
        return recordId.equals(that.recordId) &&
                Objects.equals(diseaseTypeName, that.diseaseTypeName) &&
                Objects.equals(diseaseTypeId, that.diseaseTypeId) &&
                Objects.equals(relateRecordId, that.relateRecordId) &&
                Objects.equals(relateName, that.relateName) &&
                Objects.equals(relateType, that.relateType) &&
                Objects.equals(gmtCreate, that.gmtCreate) &&
                Objects.equals(sampleTypeCode, that.sampleTypeCode) &&
                Objects.equals(sampleTypeName, that.sampleTypeName) &&
                Objects.equals(indexResultType, that.indexResultType) &&
                Objects.equals(minAge, that.minAge) &&
                Objects.equals(maxAge, that.maxAge) &&
                Objects.equals(sexCode, that.sexCode) &&
                Objects.equals(indexUpperLimit, that.indexUpperLimit) &&
                Objects.equals(indexLowerLimit, that.indexLowerLimit) &&
                Objects.equals(warn, that.warn) &&
                Objects.equals(standards, that.standards) &&
                Objects.equals(factory, that.factory) &&
                Objects.equals(drugType, that.drugType);
    }

    @Override
    public int hashCode() {
        return Objects.hash(recordId, diseaseTypeName, diseaseTypeId, relateRecordId, relateName, relateType,
                gmtCreate, sampleTypeCode, sampleTypeName, indexResultType, minAge, maxAge, sexCode, indexUpperLimit, indexLowerLimit, warn, standards, factory, drugType);
    }
}
